package org.ncibi.cytoscape.metscape.plugin;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.TreeMap;
import java.util.Vector;

import org.ncibi.cytoscape.metscape.data.CompoundData;
import org.ncibi.cytoscape.metscape.data.ConceptData;
import org.ncibi.cytoscape.metscape.data.GeneData;
import org.ncibi.cytoscape.metscape.data.Organism;
import org.ncibi.cytoscape.metscape.data.QuerySubtype;
import org.ncibi.cytoscape.metscape.data.QueryType;
import org.ncibi.metab.network.NetworkType;
import org.ncibi.metab.pathway.Pathway;

public class PluginData {
	// panel and menu states
	private boolean buildNetworkPanelOpen = false;
	private boolean pathwayFilterPanelOpen = false;
	private boolean conceptFilterPanelOpen = false;
	// all input data for session
	private List<CompoundData> compoundDataStore = new ArrayList<CompoundData>(Arrays.asList(new CompoundData()));
	private List<GeneData> geneDataStore = new ArrayList<GeneData>(Arrays.asList(new GeneData()));
	private List<ConceptData> conceptDataStore = new ArrayList<ConceptData>(Arrays.asList(new ConceptData()));
	// active input data
	private CompoundData currentCompoundData = new CompoundData();
	private GeneData currentGeneData = new GeneData();
	private ConceptData currentConceptData = new ConceptData();
	private Organism currentOrganism = Organism.HUMAN;
	// column selections and thresholds
	private String compoundPvalueColumn = null;
	private Double compoundPvalueThreshold = null;
	private String compoundFoldChangeColumn = null;
	private Double compoundFoldChangeThreshold = null;
	private String genePvalueColumn = null;
	private Double genePvalueThreshold = null;
	private String geneFoldChangeColumn = null;
	private Double geneFoldChangeThreshold = null;
	// default compounds/genes/pathways
	private Map<String, String> defaultCompounds = new TreeMap<String, String>();
	private Map<Integer, String> defaultGenes = new TreeMap<Integer, String>();
	private Set<Pathway> defaultPathways = null;
	// current compounds/genes/pathway and network type
	private Vector<?> currentCompounds = null;
	private Vector<?> currentGenes = null;
	private Pathway currentPathway = null;
	private NetworkType currentNetworkType = NetworkType.CREG;
	private QueryType currentQueryType = QueryType.COMPOUND_GENE;
	private QuerySubtype currentQuerySubtype = QuerySubtype.COMPOUNDS;
	
	public List<CompoundData> getCompoundDataStore() {
		return compoundDataStore;
	}

	public void setCompoundDataStore(List<CompoundData> compoundDataStore) {
		this.compoundDataStore = compoundDataStore;
	}

	public List<GeneData> getGeneDataStore() {
		return geneDataStore;
	}

	public void setGeneDataStore(List<GeneData> geneDataStore) {
		this.geneDataStore = geneDataStore;
	}

	public List<ConceptData> getConceptDataStore() {
		return conceptDataStore;
	}

	public void setConceptDataStore(List<ConceptData> conceptDataStore) {
		this.conceptDataStore = conceptDataStore;
	}
	public boolean isBuildNetworkPanelOpen() {
		return buildNetworkPanelOpen;
	}

	public void setBuildNetworkPanelOpen(boolean buildNetworkPanelOpen) {
		this.buildNetworkPanelOpen = buildNetworkPanelOpen;
	}

	public boolean isPathwayFilterPanelOpen() {
		return pathwayFilterPanelOpen;
	}

	public void setPathwayFilterPanelOpen(boolean pathwayFilterPanelOpen) {
		this.pathwayFilterPanelOpen = pathwayFilterPanelOpen;
	}

	public boolean isConceptFilterPanelOpen() {
		return conceptFilterPanelOpen;
	}

	public void setConceptFilterPanelOpen(boolean conceptFilterPanelOpen) {
		this.conceptFilterPanelOpen = conceptFilterPanelOpen;
	}
	
	public CompoundData getCurrentCompoundData() {
		return currentCompoundData;
	}

	public void setCurrentCompoundData(CompoundData currentCompoundData) {
		this.currentCompoundData = currentCompoundData;
	}

	public GeneData getCurrentGeneData() {
		return currentGeneData;
	}

	public void setCurrentGeneData(GeneData currentGeneData) {
		this.currentGeneData = currentGeneData;
	}

	public ConceptData getCurrentConceptData() {
		return currentConceptData;
	}

	public void setCurrentConceptData(ConceptData currentConceptData) {
		this.currentConceptData = currentConceptData;
	}

	public Organism getCurrentOrganism() {
		return currentOrganism;
	}

	public void setCurrentOrganism(Organism currentOrganism) {
		this.currentOrganism = currentOrganism;
	}
	
	public String getCompoundPvalueColumn() {
		return compoundPvalueColumn;
	}

	public void setCompoundPvalueColumn(String compoundPvalueColumn) {
		this.compoundPvalueColumn = compoundPvalueColumn;
	}

	public Double getCompoundPvalueThreshold() {
		return compoundPvalueThreshold;
	}

	public void setCompoundPvalueThreshold(Double compoundPvalueThreshold) {
		this.compoundPvalueThreshold = compoundPvalueThreshold;
	}
	
	public String getCompoundFoldChangeColumn() {
		return compoundFoldChangeColumn;
	}

	public void setCompoundFoldChangeColumn(String compoundFoldChangeColumn) {
		this.compoundFoldChangeColumn = compoundFoldChangeColumn;
	}

	public Double getCompoundFoldChangeThreshold() {
		return compoundFoldChangeThreshold;
	}

	public void setCompoundFoldChangeThreshold(Double compoundFoldChangeThreshold) {
		this.compoundFoldChangeThreshold = compoundFoldChangeThreshold;
	}

	public String getGenePvalueColumn() {
		return genePvalueColumn;
	}

	public void setGenePvalueColumn(String genePvalueColumn) {
		this.genePvalueColumn = genePvalueColumn;
	}

	public Double getGenePvalueThreshold() {
		return genePvalueThreshold;
	}

	public void setGenePvalueThreshold(Double genePvalueThreshold) {
		this.genePvalueThreshold = genePvalueThreshold;
	}
	
	public String getGeneFoldChangeColumn() {
		return geneFoldChangeColumn;
	}

	public void setGeneFoldChangeColumn(String geneFoldChangeColumn) {
		this.geneFoldChangeColumn = geneFoldChangeColumn;
	}

	public Double getGeneFoldChangeThreshold() {
		return geneFoldChangeThreshold;
	}

	public void setGeneFoldChangeThreshold(Double geneFoldChangeThreshold) {
		this.geneFoldChangeThreshold = geneFoldChangeThreshold;
	}

	public Map<String, String> getDefaultCompounds() {
		return defaultCompounds;
	}

	public void setDefaultCompounds(Map<String, String> defaultCompounds) {
		this.defaultCompounds = defaultCompounds;
	}

	public Map<Integer, String> getDefaultGenes() {
		return defaultGenes;
	}

	public void setDefaultGenes(Map<Integer, String> defaultGenes) {
		this.defaultGenes = defaultGenes;
	}
	
	public Set<Pathway> getDefaultPathways() {
		return defaultPathways;
	}

	public void setDefaultPathways(Set<Pathway> defaultPathways) {
		this.defaultPathways = defaultPathways;
	}

	public Vector<?> getCurrentCompounds() {
		return currentCompounds;
	}

	public void setCurrentCompounds(Vector<?> currentCompounds) {
		this.currentCompounds = currentCompounds;
	}

	public Vector<?> getCurrentGenes() {
		return currentGenes;
	}

	public void setCurrentGenes(Vector<?> currentGenes) {
		this.currentGenes = currentGenes;
	}

	public NetworkType getCurrentNetworkType() {
		return currentNetworkType;
	}

	public void setCurrentNetworkType(NetworkType currentNetworkType) {
		this.currentNetworkType = currentNetworkType;
	}

	public QueryType getCurrentQueryType() {
		return currentQueryType;
	}

	public void setCurrentQueryType(QueryType currentQueryType) {
		this.currentQueryType = currentQueryType;
	}

	public QuerySubtype getCurrentQuerySubtype() {
		return currentQuerySubtype;
	}

	public void setCurrentQuerySubtype(QuerySubtype currentQuerySubtype) {
		this.currentQuerySubtype = currentQuerySubtype;
	}

	public Pathway getCurrentPathway() {
		return currentPathway;
	}

	public void setCurrentPathway(Pathway currentPathway) {
		this.currentPathway = currentPathway;
	}
}
